Hide verbose SSH connect output, add spinners#4694
Conversation
284aa8e to
9b4dc5d
Compare
Move detailed diagnostic messages (SSH key paths, secrets scope, remote user/port, job submission details, upload progress) from cmdio.LogString to log.Infof so they only appear with --log-level=info. Add spinners for long-running operations: binary upload, cluster state check, job startup wait, and metadata polling. Keep concise user-facing step messages (Connecting, Uploading, Starting, Connected) for progress visibility. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9b4dc5d to
f5a32d5
Compare
|
Commit: f5a32d5
19 interesting tests: 7 SKIP, 6 flaky, 6 RECOVERED
Top 20 slowest tests (at least 2 minutes):
|
simonfaltum
left a comment
There was a problem hiding this comment.
[Agent Swarm Review] Verdict: Approved
- 0 Critical
- 0 Major
- 0 Gap
- 1 Nit
- 1 Suggestion
Good change. Moving diagnostic messages from cmdio.LogString to log.Infof and adding spinners for long-running operations improves the user experience. One nit on inconsistent spinner cleanup pattern.
| sp.Update("Uploading binaries...") | ||
| if err := UploadTunnelReleases(ctx, client, version, opts.ReleasesDir); err != nil { | ||
| sp.Close() | ||
| return fmt.Errorf("failed to upload ssh-tunnel binaries: %w", err) |
There was a problem hiding this comment.
[Agent Swarm Review] [Nit]
The spinner for binary upload creates and closes inline rather than using defer sp.Close(). An early return between sp := cmdio.NewSpinner(ctx) and sp.Close() would leak the spinner. The other spinners in this PR correctly use defer sp.Close().
Suggestion: Move sp.Close() to a defer and remove the explicit close calls.
| } | ||
|
|
||
| cmdio.LogString(ctx, fmt.Sprintf("Job submitted successfully with run ID: %d", waiter.RunId)) | ||
| log.Infof(ctx, "Job submitted successfully with run ID: %d", waiter.RunId) |
There was a problem hiding this comment.
Job run ID can be very useful for debugging (and cluster id too actually)
And the problem is that we can't really get them after the fact (unless we also store local logs to a file, which we don't do right now)
Summary
cmdio.LogStringtolog.Infofso they only appear with--log-level=infoConnecting to <id>...,Uploading binaries...,Starting SSH server...,Connected!) for progress visibilityResolves DECO-26523
Test plan
databricks ssh connect --cluster <id>and verify only concise step messages + spinners are shown--log-level=infoand verify detailed messages appear🤖 Generated with Claude Code